
import React from 'react'

import { Select } from 'antd';

const { Option } = Select;

function onChange(value) {
    console.log(`selected ${value}`);
}

function onBlur() {
    console.log('blur');
}

function onFocus() {
    console.log('focus');
}

function onSearch(val) {
    console.log('search:', val);
}

class XiaLa extends React.Component {
    render() {
        let {xiaLaData,Change} = this.props
        console.log(this.props)
        return (
            <div className="djlInput">
                <Select
                    showSearch
                    style={{ width: 200 }}
                    onChange={Change("GoodsId")}
                    onFocus={onFocus}
                    onBlur={onBlur}
                    onSearch={onSearch}
                    filterOption={(input, option) =>
                        option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
                    }
                    placeholder="请选择"
                    optionFilterProp="children"
                >
                    {
                            xiaLaData.map(item=>{
                            return <Option key={item.goodsId} value={item.goodsId}>{item.goodsName}</Option>
                        })
                        
                    }
                </Select>
            </div>
        )

    }


}

export default XiaLa